<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  <c:if test="${message != null && message != ''}">
	<script>
		alert('${message}');
	</script>
</c:if>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>"/>
    <title>修改用户资料</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=7" />
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>
	
	
	<script type="text/javascript" src="<%=path%>/js/ui.js"></script>
    <link id="editCss" rel="stylesheet" type="text/css" href="<%=path %>/css/style.css" />
    <link id="editCss" rel="stylesheet" type="text/css" href="<%=path%>/css/right.css" />
    <script type="text/javascript" src="<%=path%>/js/base.js"></script>
    <!-- 
    <script type="text/javascript" src="<%=path%>/jsp/ui/js/popUpBase.js"></script>  -->
    
    <script type="text/javascript">
    function $(id){
		if(id!=""&&id!=null){
			return document.getElementById(id);
			}else{
				alert(id);
				return null;
				}
	   }
	   
    function comparePwd(){
    		var pwd=$("rPassword");
    		var pwd_new=$("tPassword");
    		var pwd_re=$("tPassword_s");
    		if(pwd!=null&&pwd_new!=null&&pwd_re!=null){
    		   if(pwd.value!=""&&pwd_re.value!=""&&pwd_new.value!=""){
	    			if(pwd_new.value==pwd_re.value){
	    				$("updateUserPwdForm").action="<%=path%>/servlet/UpdateServlet?key=doUpUserPwd";
	    				$("updateUserPwdForm").submit();
	    			}else{
	    				alert("两次输入密码不一致!");
	    				return false;
	    			}
    			}else if(pwd.value=="")
    			{alert("请输入原密码!");pwd.focus();return false;}
    			else if(pwd_new.value=="")
    			{alert("请输入新密码!");pwd_new.focus();return false;}
    			else if(pwd_re.value=="")
    			{alert("请输入重复密码!");pwd_re.focus();return false;}
    		}else{
    		return false;
    		}
    		
    } 
    
    </script>
    
  </head>

<body class="bg">

<div id="nav" class="crumbs">
	当前位置：<a href="<%=path %>/servlet/ShowListServlet?key=cusList" class="title">客户管理</a> >修改用户密码
</div>

<div class="search ctitle">
	<div class="tab">
		<span class="right"></span>
		<span class="font-blue14pxb">修改用户密码</span>
    </div>
</div>

<div class="tableBox fwidth">
	<form id="updateUserPwdForm" name="updateUserPwdForm" method="post" action="" onsubmit="return comparePwd();">	
	<input type="hidden" name="userID" id="userID" value="${userID}" />
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<th class="h" width="30%">请输入原密码</th>
		<td class="text_left">
		<input id="rPassword" maxlength="30" name="rPassword" type="password" value="" style="width: 150px;color: #325f86;" />
		</td>
		
	  </tr>
	  <tr>
	     <th class="h">请输入新密码</th>
	     <td class="text_left"><input name="tPassword" id="tPassword" type="password" value="" maxlength="30" style="width: 150px;color: #325f86;"/></td>
	  </tr>
	  <tr>
	     <th class="h">请再次输入新密码</th>
	     <td class="text_left"><input name="tPassword_s" id="tPassword_s" type="password" maxlength="30" value="" style="width: 150px;color: #325f86;"/></td>
	  </tr>
	  <tr>
		<td colspan="2" align="center">
			<input type="submit" name="save" value="修 改" class="button" onMouseOver="this.className='button_mouseover'"
 onmouseout="this.className='button'"/>
		</td>
	  </tr>
	</table>
	</form>
   </div>	
</body>
</html>